package de.jonasjelten.jcalc.math;

/**
 *
 * @author michael
 */
public class JDualNumber {
    private JNumber number0, number1;

    public JDualNumber(JNumber number0, JNumber number1) {
        this.number0 = number0;
        this.number1 = number1;
    }

    public JNumber getNumber0() {
        return number0;
    }

    public JNumber getNumber1() {
        return number1;
    }

    public JNumber getNumber(int idx) {
        switch(idx) {
            case 0: return number0;
            case 1: return number1;
            default:return null;
        }
    }
}
